package com.heima.admin.controller;


import com.heima.admin.service.AuthUserRealNameService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@Api(tags = "用户认证审核")
@RestController
@RequestMapping("/api/v1/auth")
public class AuthUserRealNameController {

    @Autowired
    private AuthUserRealNameService authService;

    // 查询审核列表
    @PostMapping("/list")
    public ResponseResult getAuthList(@RequestBody AuthDto dto) {
        log.info("接到查询审核列表请求");
        // Mock 数据
        return authService.getAuthList(dto);
    }

    // 审核成功
    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto) {
        log.info("接到查询审核成功");
        return authService.authPass(dto);
    }


    // 审核失败
    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto dto) {
        log.info("接到查询审核失败");
        return authService.authFail(dto);
    }


}
